<template>
  <div v-if="async">
    <el-radio-group v-model="viewModel" :size="size">
      <el-radio label="1" size="large">选项1</el-radio>
      <el-radio label="2" size="large">选项2</el-radio>
    </el-radio-group>
  </div>
</template>

<script>
export default {
  model: {
    prop: 'dataModel',
    event: 'change'
  },
  props: {
    widget: {},
    dataModel: {},
    size: {}
  },
  data() {
    return {
      async: false,
      viewModel: ''
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    async init() {   
      if (this.dataModel) {
        this.viewModel = this.dataModel        
      }
      this.async = true
    }
  }
}
</script>